#—*— codeing = utf-8 —*—
#@Time : 2022/9/14 19:02
#@Author :计科1813 38 和泽妮
#@File : 3.8.py
#@Software : PyCharm


#   0代表石头
#   1代表剪刀
#   2代表布
import random
jinbi = 50

while 1:
    if jinbi <= 0:
        print("这局游戏你输了")
        break
    if jinbi >=100:
        print("这局游戏你赢了")
        break
    print("-"*30,"\n当前余额:",jinbi)
    system = random.randint(0,2)
    user =int(input("请出拳(0代表石头     1代表剪刀   2代表布):"))
    if system == 0 and user == 1:    #石头对剪刀  电脑赢
        print("你输了,扣5块钱")
        jinbi -=5
        continue
    if system == 0 and user == 2:   #石头对布   电脑输
        print("你赢了,加10块钱")
        jinbi += 10
        continue
    if system == 1 and user == 0:    #剪刀对石头  电脑输
        print("你赢了,加10块钱")
        jinbi += 10
        continue
    if system == 1 and user == 2:   #剪刀对布   电脑赢
        print("你输了,扣5块钱")
        jinbi -= 5
        continue
    if system == 2 and user == 0:    #布对石头  电脑赢
        print("你输了,扣5块钱")
        jinbi -= 5
        continue
    if system == 2 and user == 1:   #布对剪刀   电脑输
        print("你赢了,加10块钱")
        jinbi += 10
        continue
    print("打平了")